/**
 * Created by chang on 2017/2/14.
 */
const configService = require('../../service/dao/config');
const _config = module.exports;

_config.get_provider = (req, res) => {
    configService.provider( req.query || {}).then((data) => {
        res.jsonWrap(data);
    }).catch((e) => {
        log4js.error(e);
        res.jsonWrap(null, 1, e.message);
    });
};

_config.get_sign = (req, res) => {
    configService.sign( req.query || {}).then((data) => {
        res.jsonWrap(data);
    }).catch((e) => {
        log4js.error(e);
        res.jsonWrap(null, 1, e.message);
    });
};

_config.get_template = (req, res) => {
    configService.template( req.query || {}).then((data) => {
        res.jsonWrap(data);
    }).catch((e) => {
        log4js.error(e);
        res.jsonWrap(null, 1, e.message);
    });
};

_config.get_way = (req, res) => {
    configService.way( req.query || {}).then((data) => {
        res.jsonWrap(data);
    }).catch((e) => {
        log4js.error(e);
        res.jsonWrap(null, 1, e.message);
    });
};


